//
//  SupplyBusinessDetailViewController.m
//  CommodityManager
//
//  Created by lanou3g on 15/5/30.
//  Copyright (c) 2015年 libertyair. All rights reserved.
//

#import "SupplyBusinessDetailViewController.h"

@interface SupplyBusinessDetailViewController ()

@end

@implementation SupplyBusinessDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
   //导航栏标题
   self.navigationItem.title=@"添加供应商";
    //视图背景图片
    self.view.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"34_bg_denglu"]];
    
 #pragma mark-------------------设置导航栏上的按钮
    [self setBarButton];
     //设置代理
    _sNameTF.delegate=self;
    _sSexTF.delegate=self;
    _sShopTF.delegate=self;
    _sTimeTF.delegate=self;
    _sRemarksTF.delegate=self;
    _sPhoneNumTF.delegate=self;
    
    
}
#pragma mark-------------------设置导航栏上的按钮
-(void)setBarButton{
    //左按钮,返回供应商管理
    UIBarButtonItem *leftBI=[[UIBarButtonItem alloc] initWithTitle:@"供应商管理" style:UIBarButtonItemStylePlain target:self action:@selector(returnSupplyBusinessVC:)];
    self.navigationItem.leftBarButtonItem=leftBI;
    //右按钮,保存新增供应商
    UIBarButtonItem *rightBI=[[UIBarButtonItem alloc] initWithTitle:@"保存" style:UIBarButtonItemStylePlain target:self action:@selector(preserveSupplyBusinessInformation:)];
    self.navigationItem.rightBarButtonItem=rightBI;

}

#pragma mark-----------------左按钮点击事件,返回供应商管理页面
-(void)returnSupplyBusinessVC:(UIBarButtonItem *)BI{

    [self.navigationController popViewControllerAnimated:YES];
}
//右按钮点击事件,保存新增的供应商信息
-(void)preserveSupplyBusinessInformation:(UIBarButtonItem *)BI{


}
#pragma mark----------------输入框的键盘回收
- (BOOL)textFieldShouldReturn:(UITextField *)textField{
    
    [textField resignFirstResponder];
    return YES;
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
